home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
satellit
/
pfh0210
/
pfh.doc
< prev
next >
Wrap
Text File
|
1991-02-09
|
9KB
|
203 lines
PFH
by Rob Janssen, PE1CHL
PFH is a simple program to interpret the "Pacsat File Header" that is
on front of each file received from the PACSATs. It can also add a
Pacsat File Header to your existing file, so that it can be uploaded to
a PACSAT.
The program has been written in C, with portability in mind. It runs
on both little-endian (8086) and big-endian (68000) machines.
For all display and directory modes the program operates entirely
command-line driven, allowing the use in batchfiles. When the "-a"
option (add Pacsat File Header) is used, the program prompts for values
to be used in the header.
Starting PFH with no parameters, or with illegal parameters, yields the
following message:
Usage: pfh [-s] [-h] [-7] <inputfile> [<outputfile>]
interprets Pacsat File Header on file
when <outputfile> specified, body is copied to it
-s option suppresses certain header items
-h option prints only the header, not the body
-7 option strips high bit when copying the body
or: pfh -t <inputfile>...
prints PFH items in <inputfile>s in short format
or: pfh -d <dirfile>
prints PFH items in <dirfile> in short format
or: pfh -c <dirfile>
cleans <dirfile> (removes duplicate entries & sorts)
or: pfh -a <inputfile> <outputfile>
adds PFH to file (prompts for header values)
This indicates the 5 modes of operation of the program.
MODE 1
In this mode a downloaded file (downloaded using FTL0 or received using
the broadcast protocol) can be shown.
Use "PFH filename" to printout the header and the contents of the
downloaded file. Use "PFH inputfile outputfile" to print the header and
create "outputfile" that will contain the body of the file. (this is
useful when receiving .exe files)
The following options are recognized in this mode:
-s suppress certain boring items in the pacsat file header.
can be used when the output is sent as a BBS message.
-h only prints the header, not the body. this is useful when one
only wants to look at the header fields and/or wants to check
the checksums.
2
-7 high bit of all bytes in the body is cleared. use this to make
Wordstar files readable when you don't have that program. don't
use it when the file is binary!
MODE 2
In this mode a table of contents of a series of downloaded files can be
printed. For each file, one line of output will be generated, like:
File_ID Ty Length To From Date/Time Title
00000AD6 00 370 JA6FTL SM5BVF 0125/1932 My stn
00000AD7 0C 157056 all pe1chl 0126/0925 NET.PE1CHL 910123
00000AD8 00 553 wd3q g0k8ka 0125/2114 Not WFQ you.
00000AD9 05 32588 0126/2042 cp910126
00000ADA 0C 28808 0126/2011 AL910126
00000ADB 00 598 ALL VK3DTO 0126/0117 U2MIR ACTIVITY
This way you can find a message in a directory containing lots of
downloaded files.
This mode relies on the wildcard-expanding in your commandline
interpreter and/or C runtime. When everything is correctly setup, you
should be able to use "PFH -t *.*" to get a table of contents of all
files in the current directory.
MODE 3
In this mode a list similar to the one shown above is printed, but the
input is a single file that was downloaded from the satellite using the
DIR command.
In addition to the list of files, the highest date/time (commonly known
as "hightime" is printed in both seconds-since-1970 and in user-
readable format:
Hightime: 27A1E9B7 = 910126204231 (Sat Jan 26 20:42:31 1991)
This can be used in future directory requests, or to set the hightime
for PG.
Use "PFH -d dirfile.dl" to print the list for file "dirfile.dl". The
output can be redirected to a file as usual.
MODE 4
In this mode, nothing is printed. The specified directory file (like
in Mode 3) is sorted and duplicate entries are removed. Entries
occurring later in the file replace earlier entries.
This can be used after multiple overlapping selections have been made,
and the resulting downloaded file contains the same directory entry
more than once. The file will be sorted in upload_time order, so that
when you use mode 3 of this program (pfh -d) the files are printed in
sequence of completion.
MODE 5
In this mode you can create your own files for uploading. You'll need
to prepare your file using a separate text editor and/or compression
3
program, as PFH will only attach the header to an existing file.
Start PFH using: "PFH -a yourfile outputfile" to start creating a file
named "outputfile", that will contain a Pacsat File Header followed by
the data from the file "yourfile". This will overwrite any existing
file named "outputfile", but will not alter "yourfile".
PFH will prompt you for several items to be inserted in the Pacsat File
Header:
File-type: enter a decimal number representing the file's type. File-
types are assigned numbers, for which the following values are known
now:
0 ASCII text intended for display/printing (not compressed)
1 RLI/MBL message
2 RLI/MBL importfile (multiple message)
3 UoSAT whole orbit data (don't upload)
4 Microsat whole orbit data (don't upload)
5 UoSAT CPE data (don't upload)
6 MSDOS .EXE file
7 MSDOS .COM file
8 Keplerian elements NASA 2-line format
9 Keplerian elements AMSAT format
10 ASCII text file (compressed)
11 ELTLOG (don't upload)
12 Miscellaneous binary files
Other values will be added to this list, so check news bulletins.
When your file has another type, enter the value "255". You will be
asked for a description of the file lateron.
Source: enter the source of the file (e.g. your callsign)
Destination: enter the destination of the file (e.g. a callsign or ALL)
Priority: enter the relative priority of the file. value 0 is
recommended. Simply press <enter> to get this value as a default.
Compression-type: enter the way the file was compressed, as follows:
0 no compression (this is the default)
1 PKARC-type compression. You may also enter "arc" for this type.
2 PKZIP-type compression. You may also enter "zip" for this type.
Further types can be added to the list of compression types. When you
enter the value 255 here, you will be prompted for a text description
of your compression type.
BBS-Message-type: when the message is to be sent via a BBS, use this
character as a message type. For a bulletin this would be B. When the
file is not for use as a BBS message, just press <enter> to get no
message type.
Bulletin-ID: enter the bulletin ID to be used when the file is sent as
a BBS message. This should be present in all messages addressed to
ALL, so that anyone forwarding the message into the terrestrial BBS
network can use this value as the bulletin ID. When you just press
<enter> here the output file will get no bulletin ID, as appropriate
4
for private communication.
Title: enter a short description of the file content. This will appear
in listings like those generated by mode 2 and 3 of the program, so
limit it to 30-40 characters in length.
Keywords: enter keywords describing the file. These can be used to
select files for downloading by certain groundstation programs. Just
press <enter> when you don't want to add keywords.
Further prompts may appear, depending on your selections for File-type
and Compression-type.
When all prompts have been answered, the outputfile is created and the
PFH program exits to the operating system. You can use mode 1 to look
at the resulting outputfile.
PFH is copyright 1991 by Rob Janssen, PE1CHL
It may be used for non-commercial purposes only, provided that the name
of the author is retained in source, object and documentation.